<div style="margin-top: 10px;">
	<form class="layui-form layui-form-pane" method="post" action="article_add.html" >
	  <div class="layui-form-item">
	    <label class="layui-form-label">标题</label>
	    <div class="layui-input-block">
	      <input type="text" name="title" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
	    </div>
	  </div>
	  <div>
	  	<label class="layui-form-label">副标题</label>
	  	<div class="layui-input-block">
	      <input type="text" name="subhead" required  lay-verify="required" placeholder="请输入副标题" autocomplete="off" class="layui-input">
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <textarea name="content" id="editor1" rows="10" cols="80">
      </textarea>
	  </div>		
		<div class="layui-form-item">
	    <label class="layui-form-label">栏目</label>
	    <div class="layui-input-block">
	      <select name="category" lay-verify="" lay-search>
	      	<option></option>
					{volist name="list" id="vo"}
						<option value="{$vo.id}">{$vo.catename}</option>
	      	{/volist}
	      </select>
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">标签</label>
	    <div class="layui-input-block">
	      <input type="text" name="label" required  lay-verify="required" placeholder="请输入标签用;号隔开" autocomplete="off" class="layui-input">
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <div class="layui-input-block">     
	      <button class="layui-btn" lay-submit lay-filter="*">立即提交</button>
	      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
	    </div>
	  </div>
	</form>
</div>

<script> 
layui.use('form', function(){
  CKFinder.setupCKEditor();
	let editor = CKEDITOR.replace('editor1',{
		extraPlugins: 'codesnippetgeshi',
    codeSnippetGeshi_url: '/p/lib/colorize.php'
	});
  var form = layui.form;   
  form.render();
  form.on('submit(*)',function(data){
  	$('#editor1').text(editor.getData());
  	return post('添加成功','添加失败');
  });
});
</script>